//
//  FileDownload.h
//  CedarFinancePH
//
//  Created by lshenrong on 2018/8/6.
//  Copyright © 2018年 cedarhd. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef NS_ENUM(NSInteger, DownloadStatus) {
    DownloadStatusStart,
    DownloadStatusComplete,
    DownloadStatusError,
};


typedef void(^DownloadProgressBlock)(CGFloat progress,DownloadStatus status,NSString *downloadUrl);


@interface FileDownload : NSObject

@property (nonatomic,copy) DownloadProgressBlock downloadBlock;

@property (nonatomic,assign) BOOL isDownloading;


- (instancetype)initWithFolder:(NSString *)folderName;

- (void)startDownloadFile:(NSString *)fileUrl fileName:(NSString *)fileName;
- (void)cancel;

@end
